package com.deep.deepenterpise.dao;

import com.deep.deepenterpise.model.entity.DrDangerHistory;
import com.deep.deepenterpise.model.to.unit.DrDangerPageTo;
import com.deep.deepenterpise.model.to.unit.DrDangerSlavePageTo;
import com.deep.deepenterpise.model.vo.gas.DrSynDangerHistoryVo;
import com.deep.deepenterpise.model.vo.unit.DrDangerHistoryVo;
import com.deep.deepenterpise.model.vo.unit.DrDangerWaitVo;
import org.apache.ibatis.session.RowBounds;

import java.util.List;

/**
 * @author xyz
 * @description 针对表【dr_danger_history(DR隐患主表)】的数据库操作Mapper
 * @createDate 2024-06-23 08:33:48
 * @Entity com.deep.deepenterpise.model.entity.DrDangerHistory
 */
public interface DrDangerHistoryMapper {

    DrDangerHistory findByDrOrderNum(String drOrderNum);

    DrDangerHistory findByDrDangerNum(String drDangerNum);

    Long countByDrOrderNum(String drOrderNum);

    void insert(DrDangerHistory dangerHistory);

    Long countByPage(DrDangerPageTo drDangerPageTo);

    List<DrDangerHistoryVo> findByPage(RowBounds rowBounds, DrDangerPageTo drDangerPageTo);

    void update(DrDangerHistory dangerHistory);

    DrDangerHistory findByDrDangerNumAndDrStatus(String drDangerNum, Integer drStatus);

    Long countDrWaitByPage(DrDangerSlavePageTo drDangerSlavePageTo);

    List<DrDangerWaitVo> findDrWaitByPage(RowBounds rowBounds, DrDangerSlavePageTo drDangerSlavePageTo);

    List<DrSynDangerHistoryVo> findDrSynDangerByDrUnitKeyAndDrUpdateTimeGreaterThan(String drUnitKey, Long drUpdateTime);
}




